package com.redepronik.negosys.seguridad.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * The persistent class for the bitacora database table.
 * 
 */
@Entity
@Table(schema = "seguridad", name = "bitacora")
@NamedQuery(name = "Bitacora.findAll", query = "SELECT b FROM Bitacora b")
public class Bitacora implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "BITACORA_BITACORAID_GENERATOR", sequenceName = "SEGURIDAD.BITACORA_BITACORAID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "BITACORA_BITACORAID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Long bitacoraid;

	@Column(nullable = false)
	private Timestamp fecha;

	@Column(nullable = false, length = 200)
	private String metodo;

	// bi-directional many-to-one association to Usuario
	@ManyToOne
	@JoinColumn(name = "usuarioid", nullable = false)
	private Usuario usuario;

	public Bitacora() {
	}

	public Long getBitacoraid() {
		return this.bitacoraid;
	}

	public Timestamp getFecha() {
		return this.fecha;
	}

	public String getMetodo() {
		return this.metodo;
	}

	public Usuario getUsuario() {
		return this.usuario;
	}

	public void setBitacoraid(Long bitacoraid) {
		this.bitacoraid = bitacoraid;
	}

	public void setFecha(Timestamp fecha) {
		this.fecha = fecha;
	}

	public void setMetodo(String metodo) {
		this.metodo = metodo;
	}

	public void setUsuario(Usuario usuario) {
		this.usuario = usuario;
	}

}